//
//  YYJLVideoInformationController.m
//  YuanyangJinlou
//
//  Created by mac004 on 2017/1/10.
//  Copyright © 2017年 suli19910309@qq.com. All rights reserved.
//  视频介绍信息

#import "YYJLVideoInformationController.h"

@interface YYJLVideoInformationController ()
{
    UIView * informationView;//信息view
    UIView * summaryView;//概述view
    UIView * moreView;//更多view
    UILabel     * titleLB;//名称
    UILabel     * conditionLb;//条件
    UILabel     * styleLb;//类型
    UILabel     * timeLb;//时长
    UILabel     * numLb;//观看次数
    UILabel     * harvestLb;//可获得积分
    UILabel     * attentionLb;//注意事项
    UILabel     * summaryLb;//概述
    UIImageView * showPic;//更多视频
    UILabel     * titleLM;//更多视频名称
    UIImage     * img;
}
@end

@implementation YYJLVideoInformationController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    img=[UIImage imageNamed:@"ico_biaoqian1"];
    [self addInformationView];
    [self addSummaryView];
    [self addMoreView];
   
    
}
-(void)addInformationView{
    informationView=[[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 150*PER_HEIGHT)];
    informationView.backgroundColor=[UIColor whiteColor];
    [self.view addSubview:informationView];
    
    UIImageView * imgView=[[UIImageView alloc]initWithFrame:CGRectMake(12*PER_WIDTH, 10*PER_HEIGHT, img.size.width*PER_WIDTH, img.size.height*PER_HEIGHT)];
    imgView.image=img;
    [informationView addSubview:imgView];
    
    titleLB=[MyControl createLabelWithFrame:CGRectMake(imgView.right+5*PER_WIDTH, 10*PER_HEIGHT, informationView.width-40*PER_WIDTH, 14*PER_HEIGHT) Font:14 Text:@"最新最全的珠宝玉石分类(一)" Color:BLACK_COLOR];
    [informationView addSubview:titleLB];
    
    styleLb=[MyControl createLabelWithFrame:CGRectMake(17*PER_WIDTH, titleLB.bottom+15*PER_HEIGHT, titleLB.width, 12*PER_HEIGHT) Font:12 Text:@"类型: 珠宝知识大全" Color:FEELT_COLOR];
    [informationView addSubview:styleLb];
    
    timeLb=[MyControl createLabelWithFrame:CGRectMake(styleLb.left, styleLb.bottom+10*PER_HEIGHT, 80*PER_HEIGHT, 12*PER_HEIGHT) Font:12 Text:@"时长: 1:20" Color:FEELT_COLOR];
    [informationView addSubview:timeLb];
    
    numLb=[MyControl createLabelWithFrame:CGRectMake(timeLb.right+60*PER_WIDTH, timeLb.top, 100, 12*PER_HEIGHT) Font:12 Text:@"已有64人观看" Color:FEELT_COLOR];
    [informationView addSubview:numLb];
    
    conditionLb=[MyControl createLabelWithFrame:CGRectMake(timeLb.left, timeLb.bottom+10*PER_HEIGHT, titleLB.width, 12*PER_HEIGHT) Font:12 Text:@"所需积分: 免费" Color:FEELT_COLOR];
    [informationView addSubview:conditionLb];
    
    harvestLb=[MyControl createLabelWithFrame:CGRectMake(conditionLb.left, conditionLb.bottom+10*PER_HEIGHT, conditionLb.width, 12*PER_HEIGHT) Font:12 Text:@"可获得积分: 20" Color:FEELT_COLOR];
    [informationView addSubview:harvestLb];
    
    attentionLb=[MyControl createLabelWithFrame:CGRectMake(harvestLb.left, harvestLb.bottom+10*PER_HEIGHT, titleLB.width, 12*PER_HEIGHT) Font:12 Text:@"观看视频必须连续达到20分钟才可获得积分哦!" Color:TINK_COLOR];
    [informationView addSubview:attentionLb];
    
}
-(void)addSummaryView{
    summaryView=[[UIView alloc]initWithFrame:CGRectMake(0, informationView.bottom+5*PER_HEIGHT, SCREEN_WIDTH, 80*PER_HEIGHT)];
    summaryView.backgroundColor=[UIColor whiteColor];
    [self.view addSubview:summaryView];
    
    UIImageView * imgView=[[UIImageView alloc]initWithFrame:CGRectMake(12*PER_WIDTH, 10*PER_HEIGHT, img.size.width*PER_WIDTH, img.size.height*PER_HEIGHT)];
    imgView.image=img;
    [summaryView addSubview:imgView];
    
    UILabel * titleLS=[MyControl createLabelWithFrame:CGRectMake(imgView.right+5*PER_WIDTH, 10*PER_HEIGHT, informationView.width-40*PER_WIDTH, 14*PER_HEIGHT) Font:14 Text:@"课程概述" Color:BLACK_COLOR];
    [summaryView addSubview:titleLS];
    
    summaryLb=[MyControl createLabelWithFrame:CGRectMake(17*PER_WIDTH, titleLS.bottom+15*PER_HEIGHT, titleLS.width, 30*PER_HEIGHT) Font:12 Text:@"钻石,宝石怎么区分?翡翠和软玉有什么区别?本节课教你区分宝石与玉石." Color:FEELT_COLOR];
    [summaryView addSubview:summaryLb];
    
}
-(void)addMoreView{
    moreView=[[UIView alloc]initWithFrame:CGRectMake(summaryView.left, summaryView.bottom+5*PER_HEIGHT, summaryView.width, 175*PER_HEIGHT)];
    moreView.backgroundColor=[UIColor whiteColor];
    [self.view addSubview:moreView];
    UIImageView * imgView=[[UIImageView alloc]initWithFrame:CGRectMake(12*PER_WIDTH, 10*PER_HEIGHT, img.size.width*PER_WIDTH, img.size.height*PER_HEIGHT)];
    imgView.image=img;
    [moreView addSubview:imgView];
    
    UILabel * titleLS=[MyControl createLabelWithFrame:CGRectMake(imgView.right+5*PER_WIDTH, 10*PER_HEIGHT, informationView.width-40*PER_WIDTH, 14*PER_HEIGHT) Font:14 Text:@"更多视频..." Color:BLACK_COLOR];
    [moreView addSubview:titleLS];
    
    showPic=[[UIImageView alloc]initWithFrame:CGRectMake(imgView.left, titleLS.bottom+15*PER_HEIGHT, 171*PER_WIDTH, 110*PER_HEIGHT)];
    showPic.image=[UIImage imageNamed:@"img_kecheng1"];
    [moreView addSubview:showPic];
    UIImage * playImg=[UIImage imageNamed:@"ico_bofang"];//31*31
   UIButton*  playBtn=[MyControl createButtonWithFrame:CGRectMake(showPic.width/2-playImg.size.width/2*PER_WIDTH, showPic.height/2-playImg.size.height/2*PER_WIDTH, playImg.size.width*PER_WIDTH, playImg.size.width*PER_WIDTH) ImageName:@"ico_bofang" Target:self Action:@selector(play) Title:@""];
    [showPic addSubview:playBtn];

    titleLM=[MyControl createLabelWithFrame:CGRectMake(showPic.left, showPic.bottom+10*PER_HEIGHT, moreView.width-showPic.left, 13*PER_HEIGHT) Font:13 Text:@"最新最全的珠宝玉石分类(二)" Color:BLACK_COLOR];
    [moreView addSubview:titleLM];
    
    
}
-(void)play{
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
